<?php

class CommonAction extends Action {

    public function _initialize() {

        if (!$_SESSION['current_user']) {
            $this->error('请先登录！', U('Login/index'), 3);
            exit();
        }
    }

}

?>